home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / quicspool / wwfonts / tmathit.mf < prev    next >
Text File  |  1990-10-01  |  41KB  |  1,016 lines

  1. % $Header: tmathit.mf,v 1.1 88/01/15 13:15:08 simpson Rel $
  2. % $Log:    tmathit.mf,v $
  3. %Revision 1.1  88/01/15  13:15:08  simpson
  4. %initial release
  5. %
  6. %Revision 0.1  87/12/11  19:01:36  simpson
  7. %beta test
  8. %
  9. % The Computer Modern Math Italic family (by D. E. Knuth, 1979--1985)
  10.  
  11. font_coding_scheme:="TeX math italic";
  12. mode_setup; font_setup;
  13.  
  14. input tgreekl;  % lower case Greek letters
  15.  
  16. % From file italms.mf, font cmmi10 (output with slant)
  17. cmchar "Lowercase italic script l";
  18. beginchar(oct"044",4.5u#+max(1.5u#,stem#),asc_height#,0);
  19. italcorr .8asc_height#*slant-u#;
  20. adjust_fit(if monospace:u#,u# else: 0,0 fi); pickup fine.nib;
  21. pos1(hair,-45); pos2(hair,0); pos3(vair,90);
  22. pos4(stem,180); pos5(vair,270); pos6(hair,315);
  23. lft x1l=hround(lft x1l-x1); rt x2r=hround(w-1.5u); x3=.5w;
  24. lft x4r=hround .5u; x5=x3+.75u; x6=x1+w+1;
  25. y1=y6=.125h; y2=.8h; top y3r=h+oo; y4=.5[y3,y5]; bot y5=-oo;
  26. filldraw stroke z1e{10u,asc_height}...z2e{up}...pulled_arc.e(3,4)
  27.  & pulled_arc.e(4,5)...z6e{10u,asc_height};  % bowl and hook
  28. math_fit(0,ic#); penlabels(1,2,3,4,5,6); endchar;
  29.  
  30. font_slant slant;  
  31. font_x_height x_height#;
  32. font_quad 18u#+4letter_fit#;
  33.  
  34. slant:=mono_charic#:=0;  % the remaining characters will not be slanted
  35. currenttransform:=identity yscaled aspect_ratio scaled granularity;
  36.  
  37. input titalms;  % special symbols for math italic
  38. input tgreeku;  % upper case greek letters
  39. input tromms;  % roman math specials
  40.  
  41. % The following characters come from a hodge-podge of files.
  42.  
  43. % My own creation (created in just 1 hour!)
  44. cmchar "Right hand";
  45. beginchar(oct"004", 2.1body_height#, body_height#, 0);
  46. adjust_fit(0,0);
  47. picture hand;
  48. % On the graph I drew this on, the hand is 40 units tall and 84 (2.1*40) units
  49. % wide.
  50. handunit# := body_height#/40;
  51. define_pixels(handunit);
  52. z1=(4handunit,0); z2=(handunit,handunit); z3=(0,4handunit);
  53. z4=(0,34handunit); z5=(handunit,36handunit); z6=(4handunit,37handunit);
  54. z7=(9handunit,35handunit); z8=(16handunit,36handunit); 
  55. z9=(30handunit,38handunit); z10=(50handunit,40handunit);
  56. z11=(70handunit,40handunit); z12=(78handunit,40handunit);
  57. z13=(84handunit,38handunit); z14=(83handunit,34handunit);
  58. z15=(80handunit,33handunit); z16=(56handunit,30handunit);
  59. z17=(52handunit,29handunit); z18=(51handunit,24handunit);
  60. z19=(46handunit,18handunit); z20=(45handunit,14handunit);
  61. z21=(40handunit,8handunit); z22=(37handunit,handunit);
  62. z23=(35handunit,0); z24=(27handunit,handunit); z25=(13handunit,2handunit);
  63. fill z1{dir 180}..z2{z3-z1}..{dir 90}z3--z4{dir 90}..z5{z6-z4}..z6{dir 0}
  64. ..z7{dir 0}..z8..z9..z10..z11{dir 0}--z12{dir 0}..z13{dir -80}..z14{dir 225}
  65. ..z15{dir 190}--z16..{dir 200}z17 & flex(z17,z18,z19) & flex(z19,z20,z21)
  66. ..z22{dir 225}..z23{dir 180}..z24{z25-z23}..z25..cycle;
  67. hand:=currentpicture;
  68. endchar;
  69.  
  70. % My own creation
  71. cmchar "Left hand";
  72. beginchar(oct"036", 2.1body_height#, body_height#, 0);
  73. adjust_fit(0,0);
  74. currentpicture:=hand reflectedabout ((.5w,0),(.5w,h));
  75. endchar;
  76.  
  77. % From font cmsy10, file symbol.mf
  78. cmchar "Subset or equal to sign";
  79. compute_spread(.45x_height#,.55x_height#);
  80. spread#':=spread#; spread':=spread; % the spread of `$=$'
  81. compute_spread(5/4x_height#,3/2x_height#);
  82. beginchar(oct"133",14u#,v_center(spread#'+spread#+rule_thickness#));
  83. adjust_fit(0,0); pickup rule.nib; autorounded;
  84. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  85. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  86. x4=x5=.5w; y4=y1; y5=y3;
  87. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  88. x8=x1; lft x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % lower bar
  89. labels(1,2,3,4,5,8,9); endchar;
  90.  
  91. % From font cmsy10, file symbol.mf
  92. cmchar "Superset or equal to sign";
  93. compute_spread(.45x_height#,.55x_height#);
  94. spread#':=spread#; spread':=spread; % the spread of `$=$'
  95. compute_spread(5/4x_height#,3/2x_height#);
  96. beginchar(oct"002",14u#,v_center(spread#'+spread#+rule_thickness#));
  97. adjust_fit(0,0); pickup rule.nib; autorounded;
  98. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  99. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  100. x4=x5=.5w; y4=y1; y5=y3;
  101. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  102. x8=x1; rt x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % lower bar
  103. labels(1,2,3,4,5,8,9); endchar;
  104.  
  105. % From font cmsy10, file symbol.mf
  106. cmchar "Times operator";
  107. beginarithchar(oct"052"); pickup rule.nib;
  108. x1=good.x(1/sqrt2)[.5w,rt u]; y1=good.y(1/sqrt2)[math_axis,bot h];
  109. x2=x3=w-x1; x4=x1; .5[y1,y2]=.5[y3,y4]=math_axis; y2=y4;
  110. draw z1--z2; draw z3--z4;  % diagonals
  111. labels(1,2,3,4); endchar;
  112.  
  113. % From font cmsy10, file symbol.mf
  114. cmchar "Asterisk at the axis";
  115. beginchar(oct"071",9u#,v_center(x_height#));
  116. adjust_fit(0,0);
  117. numeric ast_flare; ast_flare=hround .7[thin_join,stem];
  118. x0=.5w; y0=h-.5x_height;
  119. for d=-150 step 60 until 150: z[d]=z0+.5dir d xscaled 7.5u yscaled x_height;
  120.  numeric theta; theta=angle(z[d]-z0);
  121.  fill z0+.5(0,-thin_join)rotated theta
  122.   ---z[d]+.5(-ast_flare,-ast_flare)rotated theta
  123.   ..z[d]..z[d]+.5(-ast_flare,ast_flare)rotated theta
  124.   ---z0+.5(0,thin_join)rotated theta--cycle; endfor  % diagonal at angle |d|
  125. labels(0,[-150],[-90],[-30],30,90,150); endchar;
  126.  
  127. % From font cmsy10, file symbol.mf
  128. cmchar "Elementary division operator";
  129. beginarithchar(oct"057"); pickup rule.nib;
  130. x3-.5dot_size=hround(.5w-.5dot_size); w:=r:=2x3;
  131. y3+.5dot_size=vround(math_axis+math_spread[.5x_height,.6x_height]+.5dot_size);
  132. lft x1=hround u-eps; x2=w-x1; y1=y2=math_axis;
  133. draw z1--z2;  % bar
  134. pos3(dot_size,0); pos4(dot_size,90); z3=z4;
  135. pos5(dot_size,0); pos6(dot_size,90); z5=z6; x5=x3; .5[y3,y5]=math_axis;
  136. dot(3,4); dot(5,6);  % dots
  137. penlabels(1,2,3,4,5,6); endchar;
  138.  
  139. % From font cmsy10, file symbol.mf
  140. cmchar "Similarity sign";
  141. compute_spread(.45x_height#,.55x_height#);
  142. beginchar(oct"062",14u#,v_center(spread#+rule_thickness#));
  143. adjust_fit(0,0);
  144. pickup pencircle xscaled .7rule_thickness yscaled 1.4rule_thickness;
  145. if vair#>.8curve#: pickup rule.nib; autorounded; fi % monoline
  146. lft x1=hround u; x2=4u; x3=w-x2; x4=w-x1;
  147. bot y1=bot y3=-d; top y2=top y4=h;
  148. draw z1{up}...z2{right}..{right}z3...{up}z4;  % stroke
  149. labels(1,2,3,4); endchar;
  150.  
  151. % From font cmsy10, file symbol.mf
  152. cmchar "Similar or equal sign";
  153. compute_spread(.45x_height#,.55x_height#);
  154. beginchar(oct"061",14u#,v_center(2spread#+rule_thickness#));
  155. adjust_fit(0,0);
  156. pickup pencircle xscaled .7rule_thickness yscaled 1.4rule_thickness;
  157. if vair#>.8curve#: pickup rule.nib; autorounded; fi % monoline
  158. lft x1=hround u; x2=4u; x3=w-x2; x4=w-x1;
  159. bot y1=bot y3=floor math_axis; top y2=top y4=h;
  160. draw z1{up}...z2{right}..{right}z3...{up}z4;  % stroke
  161. pickup rule.nib; lft x5=hround u-eps; x6=w-x5; y5=y6=math_axis-spread;
  162. draw z5--z6;  % bar
  163. labels(1,2,3,4,5,6); endchar;
  164.  
  165. % From font cmsy10, file symbol.mf
  166. cmchar "Proportionality sign";
  167. beginchar(oct"003",16.5u#,x_height#,0);
  168. italcorr x_height#*slant-.5u#;
  169. adjust_fit(0,-2.5u#); pickup fine.nib;
  170. numeric theta,phi; phi=angle(3u,h); theta=angle(5u,-h);
  171. pos1(vair,180); pos2(.5[vair,stem],90+.5theta); pos3(stem,90+theta);
  172. pos4(stem,90+theta); pos5(.5[vair,stem],90+.5theta);
  173. pos6(vair,180); pos7(.2[vair,stem],270+.5phi);
  174. pos8(.3[vair,stem],270+phi); pos9(.2[vair,stem],270+.5phi);
  175. lft x1r=w-rt x6l=hround u; x2=x9=.4[x1,x8]; x5=x7=.6[x8,x6];
  176. if monospace: x2l:=x2r; x5r:=x5l; x7r:=x7l; x9l:=x9r; fi
  177. y1=y6=.5h; top y2r=top y7l=h+oo; bot y5l=bot y9r=-oo;
  178. x8=.5[x3,x4]=.5w; y8=.5[y3,y4]=.5h;
  179. y3-y4=h/3; z3-z4=whatever*dir theta;
  180. filldraw stroke z1e{up}...z2e{right}...z3e---z4e...z5e{right}...z6e{up}
  181.  ...z7e{left}...{-dir phi}z8e...{left}z9e...z1e{up}; % `infinity' bowls
  182. erase fill (w-3.5u,h+o)--(w,h+o)
  183.  --(w,-o)--(w-3.5u,-o)--cycle; % erase excess
  184. penlabels(1,2,3,4,5,6,7,8,9); endchar;
  185.  
  186. % From font cmsy10, file symbol.mf
  187. cmchar "Empty set symbol";
  188. beginchar(oct"172",9u#,body_height#,body_height#-asc_height#);
  189. adjust_fit(0,0);
  190. penpos1(vair,90); penpos3(vair,-90); penpos2(stem,180); penpos4(stem,0);
  191. if not monospace: interim superness:=sqrt(more_super*hein_super); fi
  192. x2r=hround max(.7u,1.45u-.5stem);
  193. x4r=w-x2r; x1=x3=.5w; y1r=asc_height+o; y3r=-o;
  194. y2=y4=.5asc_height-vair_corr; y2l:=y4l:=.52asc_height;
  195. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  196.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  197. pickup rule.nib; lft x6=hround 2u-eps; x5=w-x6; top y5=h+o; bot y6=-d-o;
  198. draw z5--z6;  % diagonal
  199. penlabels(1,2,3,4,5,6); endchar;
  200.  
  201. % From font cmsy10, file symbol.mf
  202. cmchar "Nabla or backwards-difference operator";
  203. beginchar(oct"050",15u#,cap_height#,0);
  204. adjust_fit(0,0);
  205. numeric right_stem,alpha;
  206. right_stem=cap_hair if hefty: -3stem_corr fi;
  207. x1l=w-x4r=.75u; y1=y4=h;
  208. x2-x1=x4-x3; x3l=x2l+apex_corr; y2=y3=-apex_o-apex_oo;
  209. alpha=diag_ratio(2,right_stem,y1-y2,x4r-x1l-apex_corr);
  210. penpos1(alpha*cap_stem,0); penpos2(alpha*cap_stem,0);
  211. penpos3(alpha*right_stem,0); penpos4(alpha*right_stem,0);
  212. fill diag_end(2l,1l,1,1,4r,3r)--diag_end(4r,3r,1,1,2l,1l)--cycle;  % triangle
  213. z0=whatever[z1r,z2r]=whatever[z3l,z4l];
  214. y5=y6=h-cap_vstem; z5=whatever[z1r,z2r]; z6=whatever[z3l,z4l];
  215. if y0>cap_notch_cut: y0:=cap_notch_cut;
  216.  unfill z0+.5right{up}...{z4-z3}z6--z5{z2-z1}
  217.   ...{down}z0+.5left--cycle; % counter
  218. else: unfill z0--z5--z6--cycle; fi  % counter
  219. penlabels(0,1,2,3,4,5,6); endchar;
  220.  
  221. % From font cmsy10, file symbol.mf
  222. cmchar "Section sign";
  223. beginchar(oct"070",6.5u#+max(1.5u#,stem#),asc_height#,desc_depth#);
  224. adjust_fit(0,0); pickup fine.nib;
  225. numeric sstem; sstem=hround .75[hair,stem];
  226. pos0(stem,0); pos1(hair,0); pos2(vair,90); pos3(sstem,180); pos4(vair,270);
  227. pos5'(sstem,0); pos5(sstem,180);
  228. pos6(vair,90); pos7(sstem,0); pos8(vair,-90); pos9(hair,-180); pos10(stem,-180);
  229. top y2r=h+oo; bot y8r=-d-oo; y2-y1=y9-y8=(y2-y8)/8;
  230. y3=.52[y4,y2]; y5=.52[y4,y6]; y7=.52[y6,y8]; y5'=.52[y6,y4];
  231. y2-y4=y4-y6=y6-y8;
  232. rt x1r=hround(w-1.5u); lft x3r=hround 1.25u;
  233. x2=x4=x6=x8=.5w; x5=x7=w-x3; x5'=x3; x9=w-x1;
  234. bulb(2,1,0); bulb(8,9,10);  % bulbs
  235. filldraw stroke z2e{left}...z3e{down}...z4e{3(x5-x3),y5-y3}
  236.  ...z5e{down}...{left}z6e;  % upper stroke
  237. filldraw stroke z4e{left}...z5'e{down}...z6e{3(x7-x5'),y7-y5'}
  238.  ...z7e{down}...{left}z8e;  % upper stroke
  239. penlabels(0,1,2,3,4,5,6,7,8,9,10); endchar;
  240.  
  241. % From font cmsy10, file symbol.mf
  242. cmchar "Double dagger mark";
  243. beginchar(oct"131",8u#,asc_height#,desc_depth#);
  244. adjust_fit(0,0); pickup fine.nib;
  245. pos1(stem,0); pos2(thin_join,0); pos3(stem,0);
  246. pos4(stem,90); pos2'(thin_join,90); pos5(stem,90); z2'=z2;
  247. x1=x2=x3; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1;
  248. x4-.5stem=hround u; x5=w-x4;
  249. y1+.5stem=h+oo; y2=y4=y5=.5[y1,y3]; y3-.5stem=ceiling(.5[-d,h]);
  250. filldraw circ_stroke z1e{down}..{down}z2e;  % top stem
  251. filldraw circ_stroke z3e{up}..{up}z2e;    % upper middle stem
  252. filldraw circ_stroke z4e{right}..{right}z2'e;  % top left bulb
  253. filldraw circ_stroke z5e{left}..{left}z2'e;  % top right bulb
  254. pos6(stem,0); pos7(thin_join,0); pos8(stem,0);
  255. pos9(stem,90); pos7'(thin_join,90); pos0(stem,90); z7'=z7;
  256. x6=x7=x8=x1; x9=x4; x0=x5;
  257. y6=y3-stem-1; y7=y9=y0=.5[y6,y8]; y8-.5stem=-d-oo;
  258. filldraw circ_stroke z6e{down}..{down}z7e;  % lower middle stem
  259. filldraw circ_stroke z8e{up}..{up}z7e;    % bottom stem
  260. filldraw circ_stroke z9e{right}..{right}z7'e;  % bottom left bulb
  261. filldraw circ_stroke z0e{left}..{left}z7'e;  % bottom right bulb
  262. penlabels(1,2,3,4,5,6,7,8,9,0); endchar;
  263.  
  264. % From font cmsy10, file sym.mf
  265. cmchar "Minus";
  266. beginarithchar(oct"055"); pickup rule.nib;
  267. lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
  268. draw z1--z2;  % bar
  269. labels(1,2); endchar;
  270.  
  271. % From font cmsy10, file sym.mf
  272. cmchar "Plus-or-minus sign";
  273. beginarithchar(oct"010"); pickup rule.nib;
  274. numeric shiftup; shiftup=vround 1.5u;
  275. x1=x2=.5w; lft x3=lft=x5=hround u-eps; x4=x6=w-x3;
  276. .5[y1,y2]=y3=y4=math_axis+shiftup; top y1=h+shiftup; y5=y6=y2;
  277. draw z1--z2;  % stem
  278. draw z3--z4;  % plus bar
  279. draw z5--z6;  % minus bar
  280. labels(1,2,3,4,5,6); endchar;
  281.  
  282. % From font cmsy10, file sym.mf
  283. cmchar "Downward arrow";
  284. beginchar(oct"067",9u#,asc_height#,asc_depth#);
  285. adjust_fit(0,0); pickup crisp.nib;
  286. pos1(rule_thickness,0); pos2(rule_thickness,0);
  287. pos3(bar,90); pos4(bar,90);
  288. lft x1l=hround(.5w-.5rule_thickness); y1+.5rule_thickness=h;
  289. x0=x1=x2; bot y0=-d; x0-x3=x4-x0=3u+eps;
  290. y3=y4=y0+.24asc_height+eps;
  291. pos5(bar,angle(z4-z0)); z5l=z0;
  292. pos6(bar,angle(z3-z0)); z6l=z0;
  293. z9=.381966[.5[z3,z4],z0];
  294. numeric t; path p; p=z4r{z9-z4}..z6r;
  295. t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
  296. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  297.  --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  298.  --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
  299. penlabels(0,1,2,3,4,5,6,9); endchar;
  300.  
  301. % From font cmsy10, file sym.mf
  302. cmchar "Upward arrow";
  303. beginchar(oct"066",9u#,asc_height#,asc_depth#);
  304. italcorr .76asc_height#*slant+.5crisp#-u#;
  305. adjust_fit(0,0); pickup crisp.nib;
  306. pos1(rule_thickness,0); pos2(rule_thickness,0);
  307. pos3(bar,90); pos4(bar,90);
  308. lft x1l=hround(.5w-.5rule_thickness); y1-.5rule_thickness=-d;
  309. x0=x1=x2; top y0=h; x0-x3=x4-x0=3u+eps;
  310. y3=y4=y0-.24asc_height-eps;
  311. pos5(bar,angle(z4-z0)); z5l=z0;
  312. pos6(bar,angle(z3-z0)); z6l=z0;
  313. z9=.381966[.5[z3,z4],z0];
  314. numeric t; path p; p=z4l{z9-z4}..z6r;
  315. t=xpart(p intersectiontimes((x2r,-d)--(x2r,h))); y2=ypart point t of p;
  316. filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
  317.  --z2r---z1r..z1l---z2l--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  318.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  319. penlabels(0,1,2,3,4,5,6,9); endchar;
  320.  
  321. % From font cmsy10, file sym.mf
  322. cmchar "Leftward arrow";
  323. compute_spread(.45x_height#,.55x_height#);
  324. beginchar(oct"064",18u#,v_center(spread#+rule_thickness#));
  325. adjust_fit(0,0); pickup crisp.nib;
  326. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  327. y0=y1=y2=math_axis; x1+.5rule_thickness=hround(w-u); lft x0=hround u;
  328. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0+3u+eps;
  329. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  330. z9=.381966[.5[z3,z4],z0];
  331. numeric t; path p; p=z4r{z9-z4}..z6r;
  332. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  333. filldraw z0..{z4-z9}z4l--subpath (0,t) of\\(z4r{z9-z4}..z6r)
  334.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3r{z9-z3}..z5r)
  335.  --z3l{z9-z3}..z0 & cycle;  % arrowhead and stem
  336. penlabels(0,1,2,3,4,5,6,9); endchar;
  337.  
  338. % From font cmsy10, file sym.mf
  339. cmchar "Rightward arrow";
  340. compute_spread(.45x_height#,.55x_height#);
  341. beginchar(oct"065",18u#,v_center(spread#+rule_thickness#));
  342. adjust_fit(0,0); pickup crisp.nib;
  343. pos1(rule_thickness,90); pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  344. y0=y1=y2=math_axis; x1-.5rule_thickness=hround u; rt x0=hround(w-u);
  345. y3-y0=y0-y4=.24asc_height+eps; x3=x4=x0-3u-eps;
  346. pos5(bar,angle(z4-z0)); z5l=z0; pos6(bar,angle(z3-z0)); z6l=z0;
  347. z9=.381966[.5[z3,z4],z0];
  348. numeric t; path p; p=z4l{z9-z4}..z6r;
  349. t=xpart(p intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  350. filldraw z0..{z4-z9}z4r--subpath (0,t) of\\(z4l{z9-z4}..z6r)
  351.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  352.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  353. penlabels(0,1,2,3,4,5,6,9); endchar;
  354.  
  355. % From font cmsy10, file sym.mf
  356. cmchar "Proper subset sign";
  357. compute_spread(5/4x_height#,3/2x_height#);
  358. beginchar(oct"032",14u#,v_center(spread#+rule_thickness#));
  359. italcorr h#*slant-u#;
  360. adjust_fit(0,0); pickup rule.nib; autorounded;
  361. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  362. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  363. x4=x5=.5w; y4=y1; y5=y3;
  364. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  365. labels(1,2,3,4,5); endchar;
  366.  
  367. % From font cmsy10, file sym.mf
  368. cmchar "Proper superset sign";
  369. compute_spread(5/4x_height#,3/2x_height#);
  370. beginchar(oct"033",14u#,v_center(spread#+rule_thickness#));
  371. italcorr h#*slant-u#;
  372. adjust_fit(0,0); pickup rule.nib; autorounded;
  373. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  374. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  375. x4=x5=.5w; y4=y1; y5=y3;
  376. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  377. labels(1,2,3,4,5); endchar;
  378.  
  379. % From font cmsy10, file sym.mf
  380. cmchar "Element sign";
  381. compute_spread(5/4x_height#,3/2x_height#);
  382. beginchar(oct"037",12u#,v_center(spread#+rule_thickness#));
  383. italcorr h#*slant-u#;
  384. adjust_fit(0,0); pickup rule.nib; autorounded;
  385. lft x2=hround 1.5u-eps; x1=x3=x6=w-x2;
  386. y1-y3=spread; y2=y6=.5[y1,y3]=math_axis;
  387. x4=x5=.5w+u; y4=y1; y5=y3;
  388. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  389. draw z2--z6;  % middle bar
  390. labels(1,2,3,4,5,6); endchar;
  391.  
  392. % From font cmsy10, file sym.mf
  393. cmchar "Logical not sign";
  394. beginchar(oct"035",12u#,x_height#,0);
  395. italcorr x_height#*slant-.5u#;
  396. adjust_fit(0,0); pickup rule.nib;
  397. lft x1=hround u-eps; x2=x3=w-x1;
  398. y1=y2=good.y .5[bar_height,h]; y2-y3=1.2(h-bar_height);
  399. draw z1--z2--z3;  % bar and stem
  400. labels(1,2,3); endchar;
  401.  
  402. % From font cmsy10, file sym.mf
  403. cmchar "Less than sign";
  404. compute_spread(5/4x_height#,3/2x_height#);
  405. beginchar(oct"074",14u#,v_center(spread#+rule_thickness#));
  406. italcorr h#*slant-u#;
  407. adjust_fit(0,0); pickup rule.nib;
  408. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  409. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  410. draw z1--z2--z3;  % diagonals
  411. labels(1,2,3); endchar;
  412.  
  413. % From font cmsy10, file sym.mf
  414. cmchar "Greater than sign";
  415. compute_spread(5/4x_height#,3/2x_height#);
  416. beginchar(oct"076",14u#,v_center(spread#+rule_thickness#));
  417. italcorr math_axis#*slant-u#;
  418. adjust_fit(0,0); pickup rule.nib;
  419. rt x2=hround(w-1.5u)+eps; x1=x3=w-x2;
  420. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  421. draw z1--z2--z3;  % diagonals
  422. labels(1,2,3); endchar;
  423.  
  424. % From font cmsy10, file sym.mf
  425. cmchar "Unequals sign";
  426. compute_spread(.45x_height#,.55x_height#);
  427. beginchar(oct"063",14u#,v_center(4spread#+rule_thickness#));
  428. italcorr h#*slant-.5u#;
  429. adjust_fit(0,0); pickup rule.nib;
  430. lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
  431. y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
  432. draw z1--z2; draw z3--z4;  % bars
  433. lft x6=hround 3.5u-eps; x5=w-x6; top y5=h+o; bot y6=-d-o;
  434. draw z5--z6;  % diagonal
  435. labels(1,2,3,4,5,6); endchar;
  436.  
  437. % From font cmsy10, file sym.mf
  438. cmchar "Less than or equal to sign";
  439. compute_spread(.45x_height#,.55x_height#);
  440. spread#':=spread#; spread':=spread; % the spread of `$=$'
  441. compute_spread(5/4x_height#,3/2x_height#);
  442. beginchar(oct"011",14u#,v_center(spread#'+spread#+rule_thickness#));
  443. italcorr h#*slant-u#;
  444. adjust_fit(0,0); pickup rule.nib;
  445. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  446. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  447. draw z1--z2--z3;  % diagonals
  448. x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
  449. labels(1,2,3,8,9); endchar;
  450.  
  451. % From font cmsy10, file sym.mf
  452. cmchar "Greater than or equal to sign";
  453. compute_spread(.45x_height#,.55x_height#);
  454. spread#':=spread#; spread':=spread; % the spread of `$=$'
  455. compute_spread(5/4x_height#,3/2x_height#);
  456. beginchar(oct"012",14u#,v_center(spread#'+spread#+rule_thickness#));
  457. italcorr h#*slant-u#;
  458. adjust_fit(0,0); pickup rule.nib;
  459. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  460. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  461. draw z1--z2--z3;  % diagonals
  462. x8=x1; x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % bar
  463. labels(1,2,3,8,9); endchar;
  464.  
  465. % From font cmsy10, file sym.mf
  466. cmchar "Equivalence or congruence sign";
  467. compute_spread(.45x_height#,.55x_height#);
  468. beginchar(oct"060",14u#,v_center(2spread#+rule_thickness#));
  469. italcorr h#*slant-.5u#;
  470. adjust_fit(0,0); pickup rule.nib;
  471. lft x1=hround u-eps; x3=x5=x1; x2=x4=x6=w-x1;
  472. y1=y2; y3=y4=math_axis; y5=y6; y1-y3=y3-y5=spread;
  473. draw z1--z2;  % upper bar
  474. draw z3--z4;  % middle bar
  475. draw z5--z6;  % lower bar
  476. labels(1,2,3,4,5,6); endchar;
  477.  
  478. % From font cmsy10, file sym.mf
  479. cmchar "Reverse slash (backslash)";
  480. beginchar(oct"134",9u#,body_height#,paren_depth#);
  481. adjust_fit(0,0); pickup rule.nib;
  482. lft x1=hround u-eps; top y1=h+eps;
  483. rt x2=hround(w-u)+eps; bot y2=-d-eps;
  484. draw z1--z2;  % diagonal
  485. labels(1,2); endchar;
  486.  
  487. % From font cmsy10, file sym.mf 
  488. cmchar "Vertical line";
  489. beginchar(oct"174",5u#,body_height#,paren_depth#);
  490. italcorr body_height#*slant+.5rule_thickness#-2u#;
  491. adjust_fit(0,0); pickup rule.nib;
  492. x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps;
  493. draw z1--z2;  % stem
  494. labels(1,2); endchar;
  495.  
  496. % From font cmsy10, file sym.mf
  497. cmchar "Left curly brace";
  498. beginchar(oct"173",9u#,body_height#,paren_depth#);
  499. italcorr body_height#*slant+.5vair#-u#;
  500. adjust_fit(0,0); pickup fine.nib;
  501. forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor
  502. forsuffixes $=2,3,5,6: pos$(stem,0); endfor
  503. x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
  504. lft x4l=hround(1.5u-.5vair); lft x2l=hround(.5w-.5stem);
  505. top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
  506. y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
  507. filldraw z1l{left}...z2l---z3l...{left}z4l
  508.  --z4'l{right}...z5l---z6l...{right}z7l
  509.  --z7r--z7'r{left}...z6r---z5r...{left}.5[z4r,z4'r]{right}
  510.  ...z3r---z2r...{right}z1'r--z1r--cycle;  % stroke
  511. penlabels(1,2,3,4,5,6,7); endchar;
  512.  
  513. % From font cmsy10, file sym.mf
  514. cmchar "Right curly brace";
  515. beginchar(oct"175",9u#,body_height#,paren_depth#);
  516. italcorr math_axis#*slant+.5vair#-u#;
  517. adjust_fit(0,0); pickup fine.nib;
  518. forsuffixes $=1,1',4,4',7,7': pos$(vair,0); endfor
  519. forsuffixes $=2,3,5,6: pos$(stem,0); endfor
  520. x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
  521. rt x4r=hround(w-1.5u+.5vair); rt x2r=hround(.5w+.5stem);
  522. top y1=h; bot y7=-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
  523. y1-y2=y3-y4=(y1-y4)/4; y1-y1'=y4-y4'=y7'-y7=vair-fine;
  524. filldraw z1r{right}...z2r---z3r...{right}z4r
  525.  --z4'r{left}...z5r---z6r...{left}z7r
  526.  --z7l--z7'l{right}...z6l---z5l...{right}.5[z4l,z4'l]{left}
  527.  ...z3l---z2l...{left}z1'l--z1l--cycle;  % stroke
  528. penlabels(1,2,3,4,5,6,7); endchar;
  529.  
  530. % From font cmsy10, file sym.mf
  531. cmchar "Straight double quotes";
  532. beginchar(oct"042",9u#,asc_height#,0);
  533. numeric top_width#,spread#; top_width#=if serifs: flare# else: stem# fi;
  534. spread#=max(3u#,top_width#+.5u#); define_pixels(spread);
  535. italcorr asc_height#*slant+.5top_width#+.5spread#-4u#;
  536. adjust_fit(0,0);
  537. x1=x2; x3=x4=w-x1; x3-x1=spread+2; y1=y3;
  538. y2=y4=max(.5[bar_height,x_height]+.5vair,h-x_height);
  539. if serifs: pickup crisp.nib; pos1(flare,0); pos2(vair,0);
  540.  pos3(flare,0); pos4(vair,0);
  541.  y1+.5stem=h; filldraw circ_stroke z1e--z2e;  % left stem and bulb
  542.  filldraw circ_stroke z3e--z4e;  % right stem and bulb
  543. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  544.  pos3(stem,0); pos4(vair,0);
  545.  top y1=h; filldraw stroke z1e--z2e;  % left stem
  546.  filldraw stroke z3e--z4e; fi  % right stem
  547. penlabels(1,2,3,4); endchar;
  548.  
  549. % From font cmsy10, file sym.mf
  550. cmchar "Infinity";
  551. beginchar(oct"001",18u#,x_height#,0);
  552. italcorr .7x_height#*slant-.5u#;
  553. adjust_fit(0,0); pickup fine.nib;
  554. numeric theta,phi;
  555. if monospace: phi=-theta=90;
  556. else: phi=angle(4u,h); theta=angle(6u,-h); fi
  557. pos1(vair,180); pos2(.5[vair,curve],90+.5theta); pos3(curve,90+theta);
  558. pos4(curve,90+theta); pos5(.5[vair,curve],90+.5theta);
  559. pos6(vair,180); pos7(.2[vair,curve],270+.5phi);
  560. pos8(.3[vair,curve],270+phi); pos9(.2[vair,curve],270+.5phi);
  561. lft x1r=w-rt x6l=hround u; x2=x9=.4[x1,x8]; x5=x7=.6[x8,x6];
  562. if monospace: x2l:=x2r; x5r:=x5l; x7r:=x7l; x9l:=x9r; fi
  563. y1=y6=.5h; top y2r=top y7l=h+oo; bot y5l=bot y9r=-oo;
  564. x8=.5[x3,x4]=.5w; y8=.5[y3,y4]=.5h;
  565. y3-y4=h/3; z3-z4=whatever*dir theta;
  566. filldraw stroke z1e{up}...z2e{right}...z3e---z4e...z5e{right}
  567.  ...z6e{up}...z7e{left}...{-dir phi}z8e...{left}z9e...z1e{up}; % bowls
  568. penlabels(1,2,3,4,5,6,7,8,9); endchar;
  569.  
  570. % From font cmsy10, file sym.mf
  571. cmchar "Set union sign";
  572. beginchar(oct"005",12u#,.8asc_height#,0);
  573. italcorr .8asc_height#*slant-.5u#;
  574. adjust_fit(0,0); pickup rule.nib; autorounded;
  575. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  576. y1=good.y h+o; bot y3=-o; y2=y4=2/3[y1,y3]; y5=y1;
  577. draw z1---z2...z3...z4---z5;  % stems and cup
  578. labels(1,2,3,4,5); endchar;
  579.  
  580. % From font cmsy10, file sym.mf
  581. cmchar "Set intersection sign";
  582. beginchar(oct"034",12u#,.8asc_height#,0);
  583. italcorr .8asc_height#*slant-.5u#;
  584. adjust_fit(0,0); pickup rule.nib; autorounded;
  585. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  586. y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
  587. draw z1---z2...z3...z4---z5;  % stems and cap
  588. labels(1,2,3,4,5); endchar;
  589.  
  590. % My own creation
  591. cmchar "Square root extender";
  592. beginchar(oct"006",12u#,14u#,0);
  593.  adjust_fit(0,0); pickup rule.nib;
  594.  bot lft z1=(0,h); bot rt z2=(w+2u,h); draw z1--z2;
  595.  penlabels(1,2);
  596. endchar;
  597.  
  598. % From font cmsy10, file symbol.mf (hacked up to be above baseline)
  599. cmchar "Radical sign";
  600. beginchar(oct"013",15u#,14u#,2u#);
  601.  adjust_fit(0,-letter_fit#); pickup rule.nib;
  602.  x1=good.x 4/9w; x2=good.x(w+.5); bot y1=-2u; bot y2=14u;
  603.  draw z1--z2;  % diagonal
  604.  pickup crisp.nib; pos3(max(curve,rule_thickness),0);
  605.  x3l=1.5[x2,x1]; y3=.5[y1,y2];
  606.  pos4(rule_thickness,0); x4=x1; bot y4=-2u;
  607.  pos5(vair,-45); x5l=good.x(x3l-u); z5l=whatever[z3r,z2];
  608.  z6=z5r+whatever*(z2-z3r)=whatever[z3l,z4l];
  609.  z7=whatever[z1,z2]=z3r+whatever*(z4l-z3l);
  610.  filldraw z5r--z6--z4l--z4--z7--z3r--z5l--cycle;  % left diagonal and serif
  611.  penlabels(1,2,3,4,5,6,7);
  612. endchar;
  613.  
  614. % The following TRW logo is designed by Mike Urban and put in the Bell
  615. % System logo position.  The Bell System logo is not even used by AT&T
  616. % anymore and I work for TRW---so there.  There is some perverse 
  617. % appropriateness in having the escape sequence \(bs.
  618. def fixpt(expr pta,ptb,theta)=
  619.     if known xpart pta:
  620.         ((ypart pta)-(ypart ptb))/((xpart pta)-(xpart ptb))=
  621.             (sind theta)/(cosd theta);
  622.     else:
  623.         ((xpart pta)-(xpart ptb))/((ypart pta)-(ypart ptb))=
  624.             (cosd theta)/(sind theta);
  625.     fi;
  626. enddef;
  627.  
  628. def over(expr pta,ptb,delta)=
  629.     xpart pta = (xpart ptb)+(delta/cosd 20);
  630. enddef;
  631.  
  632. input logodesign;
  633.  
  634. a#:=cap_height#/3.91;
  635. define_pixels(a);
  636. beginchar(oct"007", 12.82a#, 3.91a#, 0);
  637. LOGO;
  638. endchar;
  639.  
  640. % From the font cmsy10, file sym.mf
  641. cmchar "Integral sign";
  642. beginchar(oct"015",5.25u#+max(1.25u#,stem#)+2max(1.5u#,curve#),
  643.  asc_height#,desc_depth#);
  644. italcorr asc_height#*slant-.5u#;
  645. adjust_fit(0,0); pickup fine.nib;
  646. pos1(curve,0); pos2(hair,0); pos3(vair,90); pos4(.6[hair,stem],180);
  647. pos5(stem,180); pos5'(stem,0); z5'=z5; pos6(.6[hair,stem],0);
  648. pos7(vair,-90); pos8(hair,-180); pos9(curve,-180);
  649. x7=w-x3=2.4u; rt x1r=max(rt x3+eps,hround(w-u)); x9=w-x1;
  650. x5=.5[x4,x6]; x4-x6=1.5u; lft x5r=hround(.5w-.5stem);
  651. y9-.5curve=vround(-.9d-o+vair); y3-y1=y9-y7;
  652. top y3r=h+o; bot y7r=-d-o; y5=.5[y3,y7]=.5[y4,y6]; y4-y6=2/3(y3-y7);
  653. bulb(3,2,1); bulb(7,8,9);  % bulbs
  654. filldraw stroke z3e{left}...z4e{(z5e-z4e)xscaled 1.1}
  655.  ..tension atleast 1 and atleast .8..{z5-z4}z5e;  % upper stem
  656. filldraw stroke z5'e{z6-z5}..tension atleast.8 and atleast 1
  657.  ..{(z6e-z5'e)xscaled 1.1}z6e...{left}z7e;  % lower stem
  658. math_fit(0,-2u#); 
  659. % It looks better with troff if we move it over 1 unit to the left
  660. currentpicture:=currentpicture shifted (-1u,0);
  661. penlabels(1,2,3,4,5,6,7,8,9); endchar;
  662.  
  663. % From the font cmr10, file punct.mf
  664. cmchar "Hash mark (number sign)";
  665. if monospace: compute_spread(.6x_height#,.7x_height#);
  666. else: compute_spread(.45x_height#,.55x_height#); fi
  667. beginchar("#",15u#,asc_height#,asc_depth#);
  668. italcorr (math_axis#+.5(spread#+rule_thickness#))*slant-.5u#;
  669. adjust_fit(0,0);
  670. pickup rule.nib; lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
  671. y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
  672. draw z1--z2;  % upper bar
  673. draw z3--z4;  % lower bar
  674. lft x6=hround 3u; rt x7=hround(w-3u); x5-x6=x7-x8;
  675. x8=good.x if monospace: .6 else: .5 fi\\w;
  676. top y5=top y7=h+eps; bot y6=bot y8=-d-eps;
  677. y15=y1; z15=whatever[z5,z6]; y36=y3; z36=whatever[z5,z6];
  678. y27=y2; z27=whatever[z7,z8]; y48=y4; z48=whatever[z7,z8];
  679. draw z5--if x5>x6+1:(good.x(x15+.5),y1)--(good.x(x15-.5),y1)
  680.  --(good.x(x36+.5),y3)--(good.x(x36-.5),y3)--fi\\z6;  % left diagonal
  681. draw z7--if x7>x8+1:(good.x(x27+.5),y2)--(good.x(x27-.5),y2)
  682.  --(good.x(x48+.5),y4)--(good.x(x48-.5),y4)--fi\\z8;  % right diagonal
  683. labels(1,2,3,4,5,6,7,8,15,27,36,48); endchar;
  684.  
  685. % From font cmr10, file punct.mf
  686. cmchar "Plus sign";
  687. beginarithchar("+"); pickup rule.nib;
  688. x1=x2=good.x .5w; top y1=h+eps; .5[y1,y2]=math_axis;
  689. lft x3=hround u-eps; x4=w-x3; y3=y4=math_axis;
  690. draw z1--z2;  % stem
  691. draw z3--z4;  % crossbar
  692. labels(1,2,3,4); endchar;
  693.  
  694. % From font cmr10, file accent.mf
  695. cmchar "Grave accent";
  696. beginchar(oct"140",9u#,min(asc_height#,2x_height#),0);
  697. adjust_fit(0,0);
  698. if serifs: pickup crisp.nib; x1-.5stem=hround 2u; x2=2/3[x1,w-x1];
  699.  y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
  700.  numeric theta; theta=angle(z2-z1)+90;
  701.  pos1(stem,theta); pos2(hair,theta);
  702.  filldraw circ_stroke z1e--z2e;  % diagonal
  703. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  704.  lft x1l=hround 1.5u; rt x2r=hround(.5w+.25u+.5vair);
  705.  top y1=h; bot y2=vround 2/3[h,x_height];
  706.  filldraw stroke z1e--z2e; fi  % diagonal
  707. penlabels(1,2); endchar;
  708.  
  709. % From font cmr10, file accent.mf
  710. cmchar "Acute accent";
  711. beginchar(oct"047",9u#,min(asc_height#,2x_height#),0);
  712. italcorr h#*slant-if serifs: 1.5 fi u#;
  713. adjust_fit(0,0);
  714. if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
  715.  y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
  716.  numeric theta; theta=angle(z2-z1)+90;
  717.  pos1(stem,theta); pos2(hair,theta);
  718.  filldraw circ_stroke z1e--z2e;  % diagonal
  719. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  720.  rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair);
  721.  top y1=h; bot y2=vround 2/3[h,x_height];
  722.  filldraw stroke z1e--z2e; fi  % diagonal
  723. penlabels(1,2); endchar;
  724.  
  725. % From font cmr10, file punct.mf
  726. cmchar "Equals sign";
  727. compute_spread(.45x_height#,.55x_height#);
  728. beginchar("=",14u#,v_center(spread#+rule_thickness#));
  729. italcorr h#*slant-.5u#;
  730. adjust_fit(0,0); pickup rule.nib;
  731. lft x1=hround u-eps; x3=x1; x2=x4=w-x1;
  732. y1=y2; y3=y4; y1-y3=spread; .5[y1,y3]=math_axis;
  733. draw z1--z2;  % upper bar
  734. draw z3--z4;  % lower bar
  735. labels(1,2,3,4); endchar;
  736.  
  737. % From font cmr10, file punct.mf
  738. cmchar "At sign";
  739. beginchar("@",14u#,asc_height#,0);
  740. italcorr .7asc_height#*slant-.5u#;
  741. adjust_fit(0,if hefty or monospace:-2u# else: 0 fi);
  742. pickup fine.nib; pos0(fudged.hair,0); pos1(vair,90);
  743. pos2(fudged.stem,180); pos3(vair,270);
  744. pos4(fudged.stem,-180); pos5(fudged.stem,-180);
  745. pos6(vair,-90); pos7(fudged.hair,0);
  746. pos8(vair,90); pos9(fudged.hair,180);
  747. pos10(vair,270); pos11(.5[vair,flare],360);
  748. x1=x3=.5[x0,x2]; y0=y2=.5[y1,y3];
  749. x8=x10=.5w; y7=y9=.5[y8,y10];
  750. lft x9r=hround u; x7=w-x9; top y8r=h+oo; bot y10r=-oo;
  751. top y1r=vround(.8[y10,y8]+.5vair); bot y3r=vround(.2[y10,y8]-.5vair);
  752. x6l=1/3[x5l,x7l]; y6=y3; y11=good.y(.1[y10,y8]-.5);
  753. x0=x4=x5; y4=.8[y3,y1]; y5=2/3[y7,y6];
  754. if hefty or monospace: lft x2r=hround(5u-.5fudged.stem);
  755.  rt x0r=hround(w-3u); x11r=x0r;
  756. else: lft x2r=hround 3.4u; x0=w-x2; x11r=x7r; fi
  757. filldraw stroke super_arc.e(1,2) & super_arc.e(2,3);  % left inner bowl
  758. filldraw stroke super_arc.e(3,0) & super_arc.e(0,1);  % right inner bowl
  759. filldraw stroke super_arc.e(8,9) & super_arc.e(9,10)
  760.  & term.e(10,11,right,1,4);  % left outer bowl and terminal
  761. if hefty or monospace: {{interim superness:=hein_super;
  762.   filldraw stroke super_arc.e(0,8)}};  % link
  763. else: (x,y6r)=whatever[z6l,z7l]; x6r:=x;
  764.  filldraw stroke z4e---z5e...z6e{right}...{up}z7e
  765.   & super_arc.e(7,8); fi % stem and link
  766. penlabels(0,1,2,3,4,5,6,7,8,9,10,11); endchar;
  767.  
  768. % From font cmr10, file accent.mf
  769. cmchar "Tilde (squiggle) accent";
  770. beginchar(oct"176",9u#,min(asc_height#,10/7x_height#+.5dot_size#),0);
  771. italcorr h#*slant-u#;
  772. adjust_fit(0,0);
  773. if serifs: numeric theta; theta=angle(1/6(6u-vair),1/4(h-x_height));
  774.  pickup crisp.nib; numeric mid_width; mid_width=.4[vair,stem];
  775.  pos1(vair,theta+90); pos2(vair,theta+90);
  776.  pos3(vair,theta+90); pos4(vair,theta+90);
  777.  z2-z1=z4-z3=(mid_width-crisp)*dir theta;
  778.  lft x1r=w-rt x4l=hround 1.5u; top y4r=h;
  779.  bot y1l=vround(bot y1l+min(2/3[x_height,h],y3l-.25vair)-top y1r);
  780.  pair delta; ypart delta=3(y3l-y1l); delta=whatever*dir theta;
  781.  filldraw z1l..controls(z1l+delta)and(z3l-delta)..z3l..z4l
  782.   --z4r..controls(z4r-delta)and(z2r+delta)..z2r..z1r--cycle;  % stroke
  783. else: pickup fine.nib; pos1(vair,180); pos2(vair,90);
  784.  pos3(.5[vair,slab],90); pos4(vair,90); pos5(vair,180);
  785.  lft x1r=w-rt x5l=hround 1.5u; x2-x1=x3-x2=x4-x3=x5-x4;
  786.  bot y1=bot y4l=vround(.75[x_height,h]-vair);
  787.  top y2r=top y5=h; y3=.5[y2,y4];
  788.  filldraw stroke z1e{up}...z2e{right}..z3e..{right}z4e...{up}z5e; fi % stroke
  789. penlabels(1,2,3,4,5); endchar;
  790.  
  791. % From font cmsy10, file symbol.mf
  792. cmchar "Circle for copyright, etc.";
  793. beginchar(oct"135",18u#,asc_height#,desc_depth#); autorounded;
  794. adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
  795. lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
  796. circle_points; draw_circle;  % circle
  797. labels(1,2,3,4,5,6,7,8); endchar;
  798.  
  799. % From font cmr10, file accent.mf
  800. cmchar "Circumflex (hat) accent";
  801. beginchar(oct"041",9u#,min(asc_height#,2x_height#),0);
  802. if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#;
  803.  adjust_fit(0,0);
  804.  pickup crisp.nib; pos2(.5[vair,curve],90); top y2r=h; x2=.5w;
  805.  x1=w-x3=good.x 2.25u; y1=y3=.5[x_height,y2];
  806.  pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
  807.  filldraw stroke z1e--z2e--z3e;  % diagonals
  808. else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#;
  809.  adjust_fit(0,0);
  810.  pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3;
  811.  pos2(stem,0); top y2=h; x2=.5w; bot y1=bot y3=vround 2/3[h,x_height]-eps;
  812.  lft x1l=hround(rt x2r-3.25u-.5vair); % same slope as in the acute accent
  813.  z0=whatever[z1r,z2r]=whatever[z2l,z3l];
  814.  y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l;
  815.  filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi  % diagonals
  816. penlabels(0,1,2,3,4); endchar;
  817.  
  818. % From font cmr10, file accent.mf
  819. cmchar "Circumflex (hat) accent";
  820. beginchar(oct"136",9u#,min(asc_height#,2x_height#),0);
  821. if serifs: italcorr .5[x_height#,h#]*slant+.5hair#-1.75u#;
  822.  adjust_fit(0,0);
  823.  pickup crisp.nib; pos2(.5[vair,curve],90); top y2r=h; x2=.5w;
  824.  x1=w-x3=good.x 2.25u; y1=y3=.5[x_height,y2];
  825.  pos1(hair,angle(z2-z1)+90); pos3(hair,angle(z3-z2)+90);
  826.  filldraw stroke z1e--z2e--z3e;  % diagonals
  827. else: italcorr 2/3[x_height#,h#]*slant-.5stem#+.5vair#-.75u#;
  828.  adjust_fit(0,0);
  829.  pickup fine.nib; pos1(vair,0); pos3(vair,0); x1=w-x3;
  830.  pos2(stem,0); top y2=h; x2=.5w; bot y1=bot y3=vround 2/3[h,x_height]-eps;
  831.  lft x1l=hround(rt x2r-3.25u-.5vair); % same slope as in the acute accent
  832.  z0=whatever[z1r,z2r]=whatever[z2l,z3l];
  833.  y4l=y4r=y2; x4l=good.x .2[x2l,x2]; x4r=w-x4l;
  834.  filldraw z4l--z1l--z1r--z0--z3l--z3r--z4r--cycle; fi  % diagonals
  835. penlabels(0,1,2,3,4); endchar;
  836.  
  837. % My own creation
  838. cmchar "Box rule";
  839. beginchar(oct"132",1u#,cap_height#+2u#,4.3u#);
  840. italcorr body_height#*slant+.5rule_thickness#-2u#;
  841. adjust_fit(0,0); pickup crisp.nib;
  842. pos1(vair,0); pos2(vair,0);
  843. x1=x2=hround 0; y1=h; y2=-d;
  844. filldraw stroke z1e--z2e; % stem
  845. penlabels(1,2); endchar;
  846.  
  847. % My own creation.  Only used by otroff.  See note below.
  848. cmchar "Underscore";
  849. beginchar("_",9.4u#,x_height#,.7u#);
  850. italcorr .5x_height#*slant-.5u#;
  851. adjust_fit(0,0);
  852. numeric below_baseline; below_baseline#:=4u#;
  853. define_pixels(below_baseline);
  854. pickup crisp.nib; pos1(vair,90); pos2(vair,90);
  855. top y1r=top y2r=vround(-below_baseline); x2=hround(w);
  856. x1=0;
  857. filldraw stroke z1e--z2e;  % bar
  858. penlabels(1,2); endchar;
  859.  
  860. % My own creation (This is only used by ditroff.  Ditroff's underscore
  861. % needs to be a frog's hair longer than otroff's.)
  862. cmchar "Underscore";
  863. beginchar(oct"041",9.4u#,x_height#,.7u#);
  864. italcorr .5x_height#*slant-.5u#;
  865. adjust_fit(0,0);
  866. numeric below_baseline; below_baseline#:=4u#;
  867. define_pixels(below_baseline);
  868. pickup crisp.nib; pos1(vair,90); pos2(vair,90);
  869. top y1r=top y2r=vround(-below_baseline); x2=hround(w+1u);
  870. x1=0;
  871. filldraw stroke z1e--z2e;  % bar
  872. penlabels(1,2); endchar;
  873.  
  874. % The delimiters are from the font cmex10, file bigdel.mf.  I had to hack
  875. % them up extensively though to get them to work with troff.  Troff wants
  876. % everything lined up in the center and the widths of the floor and ceiling
  877. % characters are the same as the parentheses.
  878. cmchar "Extensible left bracket---top";
  879. beginchar(oct"022",8u#,cap_height#+2u#,4u#);
  880. adjust_fit(0,0); pickup fine.nib;
  881. pos1(heavy_rule_thickness,0); pos2(heavy_rule_thickness,0);
  882. top y1=h; y2=-d; x1=x2=hround(.5w);
  883. filldraw stroke z1e--z2e;  % stem
  884. pos3(heavy_rule_thickness,90); pos4(heavy_rule_thickness,90);
  885. x3=x1l; rt x4=hround(w-.75u+.5heavy_rule_thickness); y3r=y4r=y1;
  886. filldraw stroke z3e--z4e;  % upper bar
  887. penlabels(1,2,3,4); endchar;
  888.  
  889. cmchar "Extensible left bracket---bottom";
  890. beginchar(oct"020",8u#,cap_height#+4u#,2u#);
  891. adjust_fit(0,0); pickup fine.nib;
  892. pos1(heavy_rule_thickness,0); pos2(heavy_rule_thickness,0);
  893. y1=h; bot y2=-d; x1=x2=hround(.5w);
  894. filldraw stroke z1e--z2e;  % stem
  895. pos5(heavy_rule_thickness,90); pos6(heavy_rule_thickness,90);
  896. x5=x1l; rt x6=hround(w-.75u+.5heavy_rule_thickness); y5l=y6l=y2;
  897. filldraw stroke z5e--z6e;  % lower bar
  898. penlabels(1,2,5,6); endchar;
  899.  
  900. cmchar "Extensible right bracket---top";
  901. beginchar(oct"023",8u#,cap_height#+2u#,4u#);
  902. adjust_fit(0,0); pickup fine.nib;
  903. pos1(heavy_rule_thickness,0); pos2(heavy_rule_thickness,0);
  904. top y1=h; y2=-d; x1=x2=hround(.5w);
  905. filldraw stroke z1e--z2e;  % stem
  906. pos3(heavy_rule_thickness,90); pos4(heavy_rule_thickness,90);
  907. x3=x1r; lft x4=hround(.75u-.5heavy_rule_thickness); y3r=y4r=y1;
  908. filldraw stroke z3e--z4e;  % upper bar
  909. penlabels(1,2,3,4); endchar;
  910.  
  911. cmchar "Extensible right bracket---bottom";
  912. beginchar(oct"021",8u#,cap_height#+4u#,2u#);
  913. adjust_fit(0,0); pickup fine.nib;
  914. pos1(heavy_rule_thickness,0); pos2(heavy_rule_thickness,0);
  915. y1=h; bot y2=-d; x1=x2=hround(.5w);
  916. filldraw stroke z1e--z2e;  % stem
  917. pos5(stem,90); pos6(stem,90);
  918. x5=x1r; lft x6=hround(.75u-.5heavy_rule_thickness); y5l=y6l=y2;
  919. filldraw stroke z5e--z6e;  % lower bar
  920. penlabels(1,2,5,6); endchar;
  921.  
  922. cmchar "Extensible left curly brace---middle";
  923. beginchar(oct"030",8u#,cap_height#+4u#,4u#);
  924. adjust_fit(0,0); pickup fine.nib;
  925. numeric min_breadth; min_breadth=hround(rule_thickness+.6dw);
  926. pos4(min_breadth,0); pos4'(min_breadth,0);
  927. forsuffixes $=2,3,5,6: pos$(heavy_rule_thickness,0); endfor
  928. lft x4l=lft x4'l=hround(1.5u-.5min_breadth);
  929. x2=x3=x5=x6; x2=hround(.5w);
  930. y2=h; y6=-d; .5[y4,y4']=.5[y2,y6]=.5[y3,y5];
  931. y3-y4=(y2-y6)/4; y4-y4'=min_breadth-fine;
  932. filldraw z2l---z3l...{3(x4l-x3l),y4-y3}z4l
  933.  --z4'l{3(x5l-x4l),y5-y4'}...z5l---z6l--z6r---z5r
  934.  ...{3(x4r-x5r),.5[y4,y4']-y5}.5[z4r,z4'r]{3(x3r-x4r),y3-.5[y4,y4']}
  935.  ...z3r---z2r--cycle;  % stroke
  936. penlabels(2,3,4,5,6); endchar;
  937.  
  938. cmchar "Extensible right curly brace---middle";
  939. beginchar(oct"031",8u#,cap_height#+4u#,4u#);
  940. adjust_fit(0,0); pickup fine.nib;
  941. numeric min_breadth; min_breadth=hround(rule_thickness+.6dw);
  942. pos4(min_breadth,0); pos4'(min_breadth,0);
  943. forsuffixes $=2,3,5,6: pos$(heavy_rule_thickness,0); endfor
  944. rt x4r=rt x4'r=hround(w-1.5u+.5min_breadth);
  945. x2=x3=x5=x6; x2=hround(.5w);
  946. y2=h; y6=-d; .5[y4,y4']=.5[y2,y6]=.5[y3,y5];
  947. y3-y4=(y2-y6)/4; y4-y4'=min_breadth-fine;
  948. filldraw z2r---z3r...{3(x4r-x3r),y4-y3}z4r
  949.  --z4'r{3(x5r-x4r),y5-y4'}...z5r---z6r--z6l---z5l
  950.  ...{3(x4l-x5l),.5[y4,y4']-y5}.5[z4l,z4'l]{3(x3l-x4l),y3-.5[y4,y4']}
  951.  ...z3l---z2l--cycle;  % stroke
  952. penlabels(2,3,4,5,6); endchar;
  953.  
  954. cmchar "Extension module";
  955. beginchar(oct"017",8u#,cap_height#+4u#,4u#);
  956. adjust_fit(0,0); pickup fine.nib;
  957. numeric max_breadth; max_breadth=bold+2dw;
  958. pos2(heavy_rule_thickness,0); pos2'(heavy_rule_thickness,0);
  959. x2=x2'=hround(.5w); y2=h; y2'=-d;
  960. filldraw stroke z2e--z2'e;  % link
  961. penlabels(2,2'); endchar;
  962.  
  963. cmchar "Extensible left curly brace---top";
  964. beginchar(oct"024",8u#,cap_height#+2u#,4u#);
  965. adjust_fit(0,0); pickup fine.nib;
  966. numeric min_breadth; min_breadth=hround(rule_thickness+.6dw);
  967. pos1(min_breadth,0); pos1'(min_breadth,0);
  968. pos2(heavy_rule_thickness,0); pos3(heavy_rule_thickness,0);
  969. rt x1r=rt x1'r=hround(w-1.5u+.5min_breadth);
  970. x2=x3=hround(.5w);
  971. top y1=h; y3=-d; y2=.5[y1,y3]; y1-y1'=min_breadth-fine;
  972. filldraw z1l{3(x2l-x1l),y2-y1}...z2l---z3l
  973.  --z3r---z2r...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle;  % stroke
  974. penlabels(1,2,3); endchar;
  975.  
  976. cmchar "Extensible left curly brace---bottom";
  977. beginchar(oct"025",8u#,cap_height#+4u#,2u#);
  978. adjust_fit(0,0); pickup fine.nib;
  979. numeric min_breadth; min_breadth=hround(rule_thickness+.6dw);
  980. pos7(min_breadth,0); pos7'(min_breadth,0);
  981. pos5(heavy_rule_thickness,0); pos6(heavy_rule_thickness,0);
  982. rt x7r=rt x7'r=hround(w-1.5u+.5min_breadth);
  983. x5=x6=hround(.5w);
  984. y5=h; y7=-d; y6=.5[y5,y7]; y7'-y7=min_breadth-fine;
  985. filldraw z5l---z6l...{3(x7l-x6l),y7-y6}z7l
  986.  --z7r--z7'r{3(x6r-x7r),y6-y7'}...z6r---z5r--cycle;  % stroke
  987. penlabels(5,6,7); endchar;
  988.  
  989. cmchar "Extensible right curly brace---top";
  990. beginchar(oct"026",8u#,cap_height#+2u#,4u#);
  991. adjust_fit(0,0); pickup fine.nib;
  992. numeric min_breadth; min_breadth=hround(rule_thickness+.6dw);
  993. pos1(min_breadth,0); pos1'(min_breadth,0);
  994. pos2(heavy_rule_thickness,0); pos3(heavy_rule_thickness,0);
  995. lft x1l=lft x1'l=hround(1.5u-.5min_breadth);
  996. x2=x3=hround(.5w);
  997. top y1=h; y3=-d; y2=.5[y1,y3]; y1-y1'=min_breadth-fine;
  998. filldraw z1r{3(x2r-x1r),y2-y1}...z2r---z3r
  999.  --z3l---z2l...{3(x1l-x2l),y1'-y2}z1'l--z1l--cycle;  % stroke
  1000. penlabels(1,2,3); endchar;
  1001.  
  1002. cmchar "Extensible right curly brace---bottom";
  1003. beginchar(oct"027",8u#,cap_height#+4u#,2u#);
  1004. adjust_fit(0,0); pickup fine.nib;
  1005. numeric min_breadth; min_breadth=hround(rule_thickness+.6dw);
  1006. pos7(min_breadth,0); pos7'(min_breadth,0);
  1007. pos5(heavy_rule_thickness,0); pos6(heavy_rule_thickness,0);
  1008. lft x7l=lft x7'l=hround(1.5u-.5min_breadth);
  1009. x5=x6=hround(.5w);
  1010. top y5=h; bot y7=-d; y6=.5[y5,y7]; y7'-y7=min_breadth-fine;
  1011. filldraw z5r---z6r...{3(x7r-x6r),y7-y6}z7r
  1012.  --z7l--z7'l{3(x6l-x7l),y6-y7'}...z6l---z5l--cycle;  % stroke
  1013. penlabels(5,6,7); endchar;
  1014.  
  1015. bye.
  1016.